package com.stone.controller;

public class SingletonTest {

    private static volatile SingletonTest singleton;

    private SingletonTest() {

    }

    public static SingletonTest getInstance() {
        if (null == singleton) {
            synchronized (SingletonTest.class) {
                if (null == singleton) {
                    singleton = new SingletonTest();
                }
            }
        }
        return singleton;
    }

    public static void main(String[] args) {
        Singleton instance = Singleton.INSTANCE;
        instance.businessMethod();

    }
}
